<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 随机在控制台输出班级学生姓名
        function fn(a){
            var b = a[Math.floor(Math.random() * a.length)];
        for(var i=0;i<a.length;i++){
            if(b===a[i]){
                return b;
            }
        }
        }
        document.write(fn(['夏利','夏天','夏雨','夏雪','夏冰雹','夏来','夏去','夏眠','夏火','夏价']))
       

    </script>
</body>
</html>